<!DOCTYPE html>{% load static %}
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>主页</title>
    <link rel="stylesheet" href="https://unpkg.com/mobi.css/dist/mobi.min.css">
</head>
<body style="background-image: url({% static 'background/y.jpg' %}); background-repeat: no-repeat; background-size: cover;">
<nav class="navbar navbar-default">
    <div class="container-fluid">
        <div style="text-align: center;">
            <strong>
                <p><a href="{% url 'login:index' %}">主页</a></p>
                {% if user.is_authenticated %}
                    <p><a href="javascript:">✔✔✔当前在线：{{ user.username }}✔✔✔</a></p>
                    <p><a href="{% url 'login:logout' %}">登出</a></p>
                {% else %}
                    <p style="color:red;">❌❌❌请先登录❌❌❌</p>
                    <p><a href="{% url 'login:login' %}">登录</a></p>
                    <p><a href="{% url 'login:register' %}">注册</a></p>
                {% endif %}
            </strong>
        </div>
    </div>
</nav>

<!--表单-->
{% block content %}{% endblock %}

</body>
</html>